package cn.liutao.common.enums;

import lombok.Getter;

/**
 * @author liutao
 * @Description 通用枚举类
 * @date 2023/10/30 20:17
 * @Version 1.0
 */
@Getter
public enum CommonEnum {
    SYS_NOT_ADMIN(0,"user"),//普通用户
    SYS_IS_ADMIN(1,"admin"),//管理员
    CAPTCHA_KEY("ORDER_CAPTCHA_KEY","验证码key"),
    LOGIN_KEY("ORDER_LOGIN_KEY","登录key"),
    JWT_TOKEN_SECRET("ORDER_TOKEN","token密钥"),
    JWT_TOKEN_HEADER("Authorization","token头信息字段"),
    JWT_TOKEN_EXPIRE("86400","token存活时间"),
//    FILE_UPLOAD_DIRECTORY("D://orderSystem/upload/","文件上传路径"),
    FILE_UPLOAD_DIRECTORY("/project/orderSystem/upload/","文件上传路径"),
    DISH_UPLOAD_DIRECTORY("dish/","菜品上传路径"),
    AVATAR_UPLOAD_DIRECTORY("/avatar/","用户头像上传路径"),
    QRCODE_UPLOAD_DIRECTORY("/qrCode/","餐桌二维码上传路径"),
    FILE_UPLOAD_MEMORY_THRESHOLD(1024*1024*3,"(3MB)内存临界值，超过后产生临时文件并保存到临时文件夹里"),
    FILE_UPLOAD_MAX_FILE_SIZE(1024*1024*80,"(80MB)设置最大文件上传值"),
    FILE_UPLOAD_MAX_REQUEST_SIZE(1024*1024*100,"(100MB)设置最大请求值（包含文件和表单数据）"),
    ORDER_KEY("ORDER_KEY","订单校验key"),
    DEFAULT_DISH_IMAGE("/dish/default.jpeg","默认菜品图片"),
    DEFAULT_AVATAR_IMAGE("/avatar/default.jpeg","默认用户头像图片"),
    STATUS_ON(1,"启用状态"),
    STATUS_OFF(0,"禁用状态"),
    ;

    private String value;
    private Integer intValue;
    private String desc;

    CommonEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    CommonEnum(Integer intValue, String desc) {
        this.intValue = intValue;
        this.desc = desc;
    }
}
